using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace XFSale.Helper
{
    public partial class FormMain : DevExpress.XtraEditors.XtraForm
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private void FormMain_Load(object sender, EventArgs e)
        {
        }

        private void itemMeta_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            string className = Convert.ToString(e.Link.Item.Tag);
            className = "XFSale.Helper." + className;
            try
            {
                FrmBase frame = Activator.CreateInstance(null, className).Unwrap() as FrmBase;
                frame.Dock = DockStyle.Fill;
                foreach (Control ctrl in splitter.Panel2.Controls)
                {
                    ctrl.Dispose();
                }
                splitter.Panel2.Controls.Clear();
                splitter.Panel2.Controls.Add(frame);
            }
            catch
            {
            }
        }
    }
}